import requests


# 封装一个登录成功后获取令牌的方法，作为请求头返回
def get_req_header():
    resp = requests.post(url='http://192.168.174.132:8000/api/sys/login',
                         json={"mobile": "13800000002", "password": "123456"})
    return {"Authorization": resp.json().get('data')}


if __name__ == '__main__':
    print(get_req_header())
# {'Authorization': '33c237ab-f116-4dcd-b335-ab1b210d2221'}
